package lab02.test04;
public class Work {
        //  属性:员工编号、姓名、基本工资、薪水增长额

        private String number;
        private String name;
        private int salary;
        private int increase;

        //  行为、方法
        public String getName() {
                return name;
        }

        public String getNumber() {
                return number;
        }

        public int getSalary() {
                return salary;
        }

        public int getNewSalary() {
                return (salary + increase);
        }

        //构造函数
        public Work(String number, String name, int salary, int increase) {
                this.number = number;
                this.name = name;
                this.salary = salary;
                this.increase = increase;
        }
        public static void main(String[] args) {
                Work worker = new Work("1234667", "张三", 5000, 2000);
                worker.getName();
                worker.getNumber();
                worker.getSalary();
                worker.getNewSalary();
        }
}